/*
 * @Description: 公共常量表
 * @Author: yyang
 * @Date: 2022-11-05 14:14:03
 * @LastEditTime: 2023-09-21 09:32:54
 * @LastEditors: yyang
 * @Reference: 
 */

export default {
	// aes加密key
	// AESKEY: '0f0b11bf8a4eac43d204004b14beef9d',
	AESKEY:'8NONwyJtHesysWpM',
	// 昆山市地图中心点
	MAP_CENTER: [120.980795, 31.385476],
	// 默认地图层级
	MAP_ZOOM: 15,
	// 高德地图key
	// MAP_KEY: '4d9fedbe8ae3987a09b06335343cc0c8',
	MAP_KEY: '9a7a39ab8e90508d7142a81871994a64',
}

/**
 * @description: 昆山市区划信息
 */
export class AreaInfo {
	// 昆山市行政区代码
	static areaCode = '320583000000'
	// 昆山市各区划中心点
	static centerPoint = [
		{
			"center": [
				120.98637471118431,
				31.372209140301255
			],
			"streetName": "青阳城市管理办事处"
		},
		{
			"center": [
				120.84787522574436,
				31.15863401305794
			],
			"streetName": "周庄镇"
		},
		{
			"center": [
				121.04422232123707,
				31.318773276502046
			],
			"streetName": "陆家镇"
		},
		{
			"center": [
				121.0288695913354,
				31.18002627428518
			],
			"streetName": "淀山湖镇"
		},
		{
			"center": [
				121.07427488731463,
				31.371570086621688
			],
			"center2": [
				121.00996336794427,
				31.316179699715303
			],
			"streetName": "开发区"
		},
		{
			"center": [
				121.10708042878724,
				31.31014409356735
			],
			"streetName": "花桥经济开发区"
		},
		{
			"center": [
				121.00457186810299,
				31.253066389387953
			],
			"streetName": "千灯镇"
		},
		{
			"center": [
				120.89281669305404,
				31.46802053788453
			],
			"streetName": "巴城镇"
		},
		{
			"center": [
				120.97634116593309,
				31.407502015738366
			],
			"center2": [
				120.93249634658939,
				31.41199962832712
			],
			"streetName": "柏庐城市管理办事处"
		},
		{
			"center": [
				120.9149062309325,
				31.187116190767615
			],
			"center2": [
				120.91752589278339,
				31.222483340996174
			],
			"center3": [
				120.93310064610668,
				31.22282385784535
			],
			"streetName": "锦溪镇"
		},
		{
			"center": [
				120.95548931439077,
				31.348280746287838
			],
			"streetName": "震川城市管理办事处"
		},
		{
			"center": [
				120.9531952546818,
				31.38042673469862
			],
			"streetName": "亭林城市管理办事处"
		},
		{
			"center": [
				120.91291830787574,
				31.420599489846513
			],
			"center2": [
				120.93249634658937,
				31.411999628327116
			],
			"streetName": "高新区"
		},
		{
			"center": [
				120.95498679259428,
				31.25195761340757
			],
			"center2": [
				120.93308837650332,
				31.22282317623048
			],
			"center3": [
				120.91748981298237,
				31.222462278287495
			],
			"streetName": "张浦镇"
		},
		{
			"center": [
				120.97322998427512,
				31.463621707299843
			],
			"streetName": "周市镇"
		}
	]
	// 根据区划名称找到对应的区划中心点
	static findByAreaName(streetName) {
		const obj = this.centerPoint.find(x => x.streetName === streetName)
		// 防止需要多个中心点，以数组形式返回
		const points = [];
		for (const key in obj) {
			if (key !== streetName) {
				points.push(obj[key])
			}
		}
		return points;
	}
}